export default {
    component: 'jzlNav',
    icon: 'fa fa-grip-horizontal',
    name: '菜单',

    ele_style: {
        _name: '菜单',
        _node: 'gridComp',
        _ss: {
            theme: 'jzl-nav'
        },
        _sh: {},
        _rh: false,
        _sort: [ 'item' ],
        _fix: true,
        _ext: {},

        item: {
            _name: '菜单项',
            _render: '_item',
            _node: 'grid',
            _ss: {
                theme: 'jzl-nav-item'
            },
            _sh: {},
            _rh: false,
            _sort: [ 'icon', 'img', 'title', 'remark' ],
            _value: 'model',

            icon: {
                _name: '图标',
                _render: '_icon',
                _node: 'icon',
                _value: 'scope:icon',
                _ss: {
                    theme: 'jzl-nav-icon',
                    icon: "fa fa-gem"
                },
                _sh: {},
                _rh: false
            },
            img: {
                _name: '图片',
                _render: '_img',
                _node: 'img',
                _value: 'scope:image',
                _ss: {
                    theme: 'jzl-nav-icon',
                    "display": "none"
                },
                _sh: {},
                _rh: false
            },
            title: {
                _name: '标题',
                _render: '_title',
                _node: 'text',
                _value: 'scope:title',
                _ss: {
                    theme: 'jzl-nav-title'
                },
                _sh: {},
                _rh: false
            },
            remark: {
                _name: '描述',
                _render: '_remark',
                _node: 'text',
                _value: 'scope:remark',
                _ss: {
                    theme: 'jzl-nav-remark'
                },
                _sh: {},
                _rh: false
            }
        }
    },
    setting: {
        sticky: false,
        navTheme: "jzl-nav-theme-n2",
        bgColors: [],
        iconColors: [],
        iconBgColors: []
    },
    vars: [{
        prop: "model",
        type: "json",
        default: null,
        force: true,
        initType: "static",
        // initPath: "",
        // varName: "",    // page var name
        // emptyDefault: true,
        // api: null,
        // mbCode: null,
        // formCode: null,
        // viewCode: null,
        // itemName: null,
        // apiFilter: {},
        // mapiFilter: {}

        defaultJson: [{
            icon: "fa fa-home",
            image: "",
            title: "菜单 1",
            remark: "描述 1"
        }, {
            icon: "fa fa-heart",
            image: "",
            title: "菜单 2",
            remark: "描述 2"
        }, {
            icon: "fa fa-clock",
            image: "",
            title: "菜单 3",
            remark: "描述 3"
        }, {
            icon: "fa fa-tags",
            image: "",
            title: "菜单 4",
            remark: "描述 4"
        }]
    }],
    data_fieldsmap: {},
    data_schema: {       // 组件需要的字段
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "数据列表",
        "description": "list description",
        "type": "array",
        "items": {
            "title": "",
            "type": "object",
            "properties": {
                "icon": {
                    "title": "图标",
                    "type": "string",
                    "ui:options": {
                        'widget': 'iconPicker'
                    }
                },
                "image": {
                    "title": "图片",
                    "type": "string",
                    "ui:options": {
                        'widget': 'FilePicker',
                        'attrs': {
                            'theme': 'mini'
                        }
                    }
                },
                "title": {
                    "title": "名称",
                    "type": "string"
                },
                "remark": {
                    "title": "描述",
                    "type": "string"
                },
                "link": {
                    "title": "链接",
                    "type": "string",
                    "ui:options": {
                        'widget': 'LinkView',
                        'attrs': {
                            'isView': false
                        }
                    }
                }
            }
        }
    },
    setting_schema: {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "列表 LIST 组件参数设置",
        "description": "",
        "type": "object",
        "properties": {
            "cols": {
                "title": "列数",
                "type": "integer",
                "minimum": 0,
                "maximum": 20,
                "default": 4
            },
            "bgColors": {
                "title": "菜单项颜色组",
                "type": "array",
                "ui:widget": "ColorListPicker",
                "items": {
                    "type": "string"
                }
            },
            "iconColors": {
                "title": "icon颜色组",
                "type": "array",
                "ui:widget": "ColorListPicker",
                "items": {
                    "type": "string"
                }
            },
            "iconBgColors": {
                "title": "icon背景颜色组",
                "type": "array",
                "ui:widget": "ColorListPicker",
                "items": {
                    "type": "string"
                }
            },
        }
    },
    data_type: 'static',    // static | dync
    data_dync: {
        form_code: '',
        form_view_code: '',
        report_code: '',
        url: ''
    },
    data_static: []
}
